package cn.com.scooper.impl.xf;

import cn.com.scooper.dao.xf.MineIotIndexDao;
import cn.com.scooper.pojo.po.MineIotIndexPo;
import cn.com.scooper.service.xf.MineIotIndexService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class MineIotIndexServiceImpl implements MineIotIndexService {
    @Autowired
    private MineIotIndexDao mineIotIndexDao;

    private static final Logger logger = LoggerFactory.getLogger(MineIotIndexServiceImpl.class);


    @Override
    public int batchSaveMineIotIndex(List<MineIotIndexPo> saveList) {
        return mineIotIndexDao.batchInsert(saveList);
    }

    @Override
    public int removeMineIotIndexByDeviceId(String deviceId) {
        return this.mineIotIndexDao.batchDeleteByDeviceIdList(Collections.singletonList(deviceId));
    }

    @Override
    public int batchRemoveMineIotIndex(List<String> deviceIdList) {
        return mineIotIndexDao.batchDeleteByDeviceIdList(deviceIdList);
    }
}